<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>订单详情</title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.css" />
    <link rel="stylesheet" href="../../../azxcrm/css/orderDetail.css"/>
    <script src="../../../js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="addClew">
    <!-- 订单详情 -->
    <div class="add_order clearfix">
       <div class="addorder_left">
          <span>订单详情</span> 
       </div>
      <div class="addorder_right">
          <a th:if="${order.orderStatus} == 7">流单</a>    
       </div>
    </div>
    <!-- 订单详情 -->
	<div class="tab-pane fade in active s-customerList clearfix">
	    <ul>
	        <li class="clearfix">
	            <span class="g-name">流单原因：</span>
	            <span class="s-reason" th:text="${order.finalReason}"></span>                
	        </li>
	    </ul>
	</div>
    <!-- 订单号 -->
    <div class="customer_table2">
        <table class="table customer_table3">
                <tbody>
                    <tr class="table_phone2">                            
                        <td class="phone2">订单号</td>
                        <td th:text="${order.orderNum}"></td>                                                                                   
                        <td class="phone2">订单类型</td>
                        <td th:text="${order.typeName}"></td>                           
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">客户</td>
                        <td th:text="${order.customerClue.customerName} +'&nbsp('+ ${order.customerClue.customerIdentityNum}+' , '+${order.customerClue.customerPhone}+')'"></td>  
                        <td class="phone2">跟进客服</td>
                        <td th:text="${order.serviceUserName}"></td>                                                                                                           
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">创建时间</td>
                        <td th:text="${order.createTime}"></td>                                                                                   
                        <td class="phone2">流单时间</td>
                        <td th:text="${order.finalTime}"></td>                           
                    </tr>
                </tbody>
        </table>
    </div>
    <!-- 订单号 -->

    <!-- 关联预约线索 -->
    <div class="add_table">
            <div class="add_relevance clearfix">
                <h4 class="pos-rel">关联预约线索</h4>
                <span class="addrel_right" th:text="'( '+${order.customerClue.clueId}+' )'"></span>
            </div>
            <table class="table customer_table3">
                    <tbody>
                        <tr class="table_phone2">                            
                            <td class="phone2">入住类型</td>
                            <td th:if="${order.customerClue.occupancyType} == 0">非本类型线索</td>
                            <td th:if="${order.customerClue.occupancyType} == 1">长住</td>
                            <td th:if="${order.customerClue.occupancyType} == 2">短住</td>                                                                                   
                            <td class="phone2">参加人数</td>
                            <td th:text="${order.customerClue.clueId}">人</td>                           
                        </tr>
                        <tr class="table_phone2">                            
                            <td class="phone2">旅游线路</td>
                            <td th:text="${order.customerClue.tourismRoute}"></td>                                                                                   
                            <td class="phone2">康复项目</td>
                            <td th:text="${order.customerClue.recureProject}"></td>                           
                        </tr>
                        <tr class="table_phone2">                            
                            <td class="phone2">采集时间</td>
                            <td colspan="3" th:text="${order.customerClue.createTime}"></td>                                                                                    
                        </tr>
                        <tr class="table_phone2">
                            <td class="phone2">客服建议：</td>
                            <td colspan="3" th:text="${customerClueCommunication.suggestion}"></td>
                        </tr>
                    </tbody>
            </table>
        </div>
    <!-- 关联预约线索 -->

    <!-- 预约记录 -->
    <div class="customer_table7">
        <h4 class="pos-rel">轮单记录</h4>
        <div class="table_Height">  
            <table class="table table-bordered table5_record">
                <thead>
                    <tr class="table_name">
                        <th class="s-pdtime">派单时间</th>
                        <th>客户名称</th>
                        <th>客户手机号</th>
                        <th>部门</th>
                        <th>关联业务员</th>
                        <th>保护期</th>
                        <th>是否成单</th>
                    </tr>
                </thead>
                <tbody th:each=" orders : ${ordersList}">
                    <tr>
                        <td th:text="${orders.orderDeal.dealTime}"></td>
                        <td th:text="${orders.customerClue.customerName}"></td>
                        <td th:text="${orders.customerClue.customerCellphone}"></td>
                        <td th:text="${orders.deptName}"></td>
                        <td th:text="${orders.salesUserName}"></td>
                        <td th:text="${orders.orderDispatch.protectTime}"></td>
                        <td th:if="${orders.orderDispatch.dispatchStatus}==0">未成单</td>
                        <td th:if="${orders.orderDispatch.dispatchStatus}==1">已成单</td>
                    </tr>
                    <tr>
                    	<td>未成单原因：</td>
                    	<td colspan="6" th:text="${orders.orderDispatch.unformedCause}"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>